<nz-layout class="app-layout">
  <nz-sider class="menu-sidebar"
            nzCollapsible
            nzWidth="256px"
            nzBreakpoint="md"
            [(nzCollapsed)]="isCollapsed"
            [nzTrigger]="null">
    <div class="sidebar-logo">
      <a href="https://ng.ant.design/" target="_blank">
        <img src="https://ng.ant.design/assets/img/logo.svg" alt="logo">
        <h1>Ant Design Of Angular</h1>
      </a>
    </div>
    <ul nz-menu nzTheme="dark" nzMode="inline" [nzInlineCollapsed]="isCollapsed">
      <li nz-submenu nzOpen nzTitle="门户管理" nzIcon="dashboard">
        <ul>
          <li nz-menu-item nzMatchRouter>
            <a routerLink="/frame/news">新闻管理</a>
          </li>
          <li nz-menu-item nzMatchRouter>
            <a routerLink="/frame/personal">个人信息</a>
          </li>
        </ul>
      </li>
    </ul>
  </nz-sider>
  <nz-layout>
    <nz-header>
      <div class="app-header">
        <div nz-row>
          <div nz-col nzSpan="2">
            <span class="header-trigger" (click)="isCollapsed = !isCollapsed">
              <i class="trigger"
                 nz-icon
                 [nzType]="isCollapsed ? 'menu-unfold' : 'menu-fold'"
              ></i>
          </span>
          </div>
          <div class="header-trigger" nz-col nzSpan="10" >
          </div>
          <div nz-col nzSpan="3" nzPush="9">
            当前用户:
            <a nz-dropdown [nzDropdownMenu]="menu" *ngIf="admin">
              {{ admin.username }}
              <i nz-icon nzType="down"></i>
            </a>
            <nz-dropdown-menu #menu="nzDropdownMenu">
              <ul nz-menu nzSelectable>
                <li nz-menu-item (click)="exitSystem()"><i nz-icon nzType="poweroff" nzTheme="outline"></i>退出登录</li>
              </ul>
            </nz-dropdown-menu>
          </div>
        </div>
      </div>
    </nz-header>
    <nz-content>
      <div class="inner-content" style="min-height:100%;height: auto;">
        <router-outlet></router-outlet>
      </div>
    </nz-content>
  </nz-layout>
</nz-layout>
